<template>
<div class="header">
    <router-link to='/meet'>
        <div class="header-left">
            <div class="iconfont back-icon">&#xe624;</div>
        </div>
    </router-link>
    <div class="header-input">
        <span class="iconfont">&#xe632;</span>
        输入城市/景点、游玩
    </div>
    <router-link to='/city'>
        <div class="header-right">
            {{ this.city }}
            <span class="iconfont city-icon">&#xe64a;</span>
        </div>
    </router-link>
</div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  name: 'HomeHeader',
  // props: {
  //   city: String
  // }
  computed: {
    ...mapState(['city'])
  }
}
</script>

<style lang="stylus" scoped>
    @import '~styles/varilbes.styl'
    .header
        display: flex
        line-height: .86rem
        background: $bgColor 
        color #fff
        .header-left
            width: 0.64rem
            float: left
            .back-icon
                text-align: center
                font-size: .4rem
        .header-input
            flex: 1
            height: 0.64rem
            line-height: 0.64rem
            margin: .12rem 0 0 0.2rem 
            padding: 0 0 0 .2rem
            background-color: #fff
            border-radius: .1rem
            color: #ccc
        .header-right
            padding .1rem
            min-width: 1.04rem
            float: right
            text-align: center	
            color #fff
            .city-icon 
                font-size .24rem
                
</style>
